package cn.cas.mango.util;



import lombok.extern.slf4j.Slf4j;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@Slf4j
public class GetLayerThreshold {
  private Map<Integer, Pair<Integer, Double>> map = new HashMap<>();

  {
    try (BufferedReader br = new BufferedReader(new FileReader("layer.txt"))) {
      String line;
      int i = 0;
      while ((line = br.readLine()) != null) {
        String[] split = line.split(" ");
        map.put(i++, new Pair<>(Integer.valueOf(split[0]), Double.valueOf(split[1])));
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  public Map<Integer, Pair<Integer, Double>> getMap() {
    log.info("map: {}", map);
    return map;
  }
}
